package au.edu.swin.swinvehicle.eventtype;

import au.edu.swin.swinvehicle.vehiclelicencetype.VehicleLicenceTypeEntity;

/**
 * EventType tranfer object. This is the detailed information of event type.
 * @version 1.0
 * @author Dany Gunawan
 * @lastmodify 2009-05-12
 */

// We will make the class Serializable so we can easily send it to remote clients.
public class EventTypeDetailedTO {

    private Long id;
    private String code;
    private String description;
    private VehicleLicenceTypeEntity vehicleLicenceType;

    /** Creates a new instance of EventTypeTO */
    public EventTypeDetailedTO(Long id, String code, String description, VehicleLicenceTypeEntity vehicleLicenceType) throws EventTypeManagerException {
        try {
            this.id = id;
            this.setCode(code);
            this.setDescription(description);
            this.setVehicleLicenceType(vehicleLicenceType);
        } catch (Exception e) {
            throw new EventTypeManagerException("Cannot instantiate new EventTypeDetailedTO object", e);
        }

    }

    public Long getId() {
        return id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public VehicleLicenceTypeEntity getVehicleLicenceType() {
        return vehicleLicenceType;
    }

    public void setVehicleLicenceType(VehicleLicenceTypeEntity vehicleLicenceType) {
        this.vehicleLicenceType = vehicleLicenceType;
    }
}
